<?php

namespace NanQi\Hope\Providers;
use NanQi\Hope\ConfigDataCommand;

class LaravelServiceProvider extends AbstractServiceProvider
{
    /**
     * Bootstrap any application services for laravel.
     *
     * @return void
     */
    public function boot()
    {
        $flg = app()->configurationIsCached();
        if (!$flg) {
            $conf = ConfigDataCommand::loadDataConfig();
            if (count($conf)) {
                config()->set($conf);
            }
        }

        $this->publishes([
            __DIR__ . '/../../config/hope.php' => config_path('hope.php'),
        ]);
    }
}
